home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / news / inn1.000 / inn1.4sec-linux-src.tar / inn / site / Makefile < prev   
Makefile  |  1993-03-18  |  10KB  |  255 lines

  1. ##  $Revision: 1.15 $
  2. SHELL    = /bin/sh
  3. MAKE    = make
  4. ##  =()<P    = @<P>@>()=
  5. P    = 
  6.  
  7. ##  If you want to do ctlinnd pause/reload/go, uncomment these lines.
  8. #PAUSE        = pause
  9. #RELOAD_AND_GO    = reload go
  10.  
  11. ##  =()<CTLINND        = @<_PATH_NEWSBIN>@/ctlinnd>()=
  12. CTLINND        = /news/bin/ctlinnd
  13. ##  =()<PATH_CONFIG    = @<_PATH_CONFIG>@>()=
  14. PATH_CONFIG    = /news/lib/inn.conf
  15. ##  =()<PATH_CONTROLCTL    = @<_PATH_CONTROLCTL>@>()=
  16. PATH_CONTROLCTL    = /news/lib/control.ctl
  17. ##  =()<PATH_EXPIRECTL    = @<_PATH_EXPIRECTL>@>()=
  18. PATH_EXPIRECTL    = /news/lib/expire.ctl
  19. ##  =()<PATH_INNDHOSTS    = @<_PATH_INNDHOSTS>@>()=
  20. PATH_INNDHOSTS    = /news/lib/hosts.nntp
  21. ##  =()<PATH_MODERATORS    = @<_PATH_MODERATORS>@>()=
  22. PATH_MODERATORS    = /news/lib/moderators
  23. ##  =()<PATH_DISTPATS    = @<_PATH_DISTPATS>@>()=
  24. PATH_DISTPATS    = /news/lib/distrib.pats
  25. ##  =()<PATH_NEWSBOOT    = @<_PATH_NEWSBOOT>@>()=
  26. PATH_NEWSBOOT    = /etc/rc.news
  27. ##  =()<PATH_NEWSFEEDS    = @<_PATH_NEWSFEEDS>@>()=
  28. PATH_NEWSFEEDS    = /news/lib/newsfeeds
  29. ##  =()<PATH_NNRPACCESS    = @<_PATH_NNRPACCESS>@>()=
  30. PATH_NNRPACCESS    = /news/lib/nnrp.access
  31. ##  =()<PATH_SCHEMA    = @<_PATH_SCHEMA>@>()=
  32. PATH_SCHEMA    = /news/lib/overview.fmt
  33. ##  =()<PATH_SHELLVARS    = @<_PATH_SHELLVARS>@>()=
  34. PATH_SHELLVARS    = /news/lib/innshellvars
  35. ##  =()<PATH_NNTPPASS    = @<_PATH_NNTPPASS>@>()=
  36. PATH_NNTPPASS    = /news/lib/passwd.nntp
  37. ##  =()<PATH_PARSECTL    = @<_PATH_PARSECTL>@>()=
  38. PATH_PARSECTL    = /news/bin/control/parsecontrol
  39. ##  =()<PATH_CTLWATCH    = @<_PATH_CTLWATCH>@>()=
  40. PATH_CTLWATCH    = /news/lib/innwatch.ctl
  41.  
  42. ##  =()<CTLBIN    = @<_PATH_CONTROLPROGS>@>()=
  43. CTLBIN    = /news/bin/control
  44. ##  =()<NEWSLIB    = @<_PATH_NEWSLIB>@>()=
  45. NEWSLIB    = /news/lib
  46. ##  =()<NEWSBIN    = @<_PATH_NEWSBIN>@>()=
  47. NEWSBIN    = /news/bin
  48. ## =()<OWNER    = -O @<NEWSUSER>@ -G @<NEWSGROUP>@>()=
  49. OWNER    = -O news -G news
  50.  
  51. ##  Order:  innd, control, expire, inews, sending, misc
  52. MOST        = \
  53.     makegroup rc.news overview.fmt \
  54.     checkgroups default ihave \
  55.         newgroup rmgroup sendme \
  56.         sendsys senduuname version \
  57.         parsecontrol writelog docheckgroups \
  58.     news.daily scanlogs expirerm \
  59.         tally.control tally.unwanted \
  60.     nntpsend send-ihave \
  61.         send-nntp send-uucp sendbatch \
  62.     ctlrun inncheck innstat \
  63.         innwatch innlog.awk innshellvars
  64. MOST_INSTALLED    = \
  65.     $(NEWSBIN)/makegroup $(PATH_NEWSBOOT) $(PATH_SCHEMA) \
  66.     $(CTLBIN)/checkgroups $(CTLBIN)/default $(CTLBIN)/ihave \
  67.         $(CTLBIN)/newgroup $(CTLBIN)/rmgroup $(CTLBIN)/sendme \
  68.         $(CTLBIN)/sendsys $(CTLBIN)/senduuname $(CTLBIN)/version \
  69.         $(PATH_PARSECTL) $(NEWSBIN)/writelog $(CTLBIN)/docheckgroups \
  70.     $(NEWSBIN)/news.daily $(NEWSBIN)/scanlogs $(NEWSBIN)/expirerm \
  71.         $(NEWSBIN)/tally.control $(NEWSBIN)/tally.unwanted \
  72.     $(NEWSBIN)/nntpsend $(NEWSLIB)/send-ihave \
  73.         $(NEWSLIB)/send-nntp $(NEWSLIB)/send-uucp $(NEWSBIN)/sendbatch \
  74.     $(NEWSBIN)/ctlrun $(NEWSBIN)/inncheck $(NEWSBIN)/innstat \
  75.         $(NEWSBIN)/innwatch $(NEWSLIB)/innlog.awk $(PATH_SHELLVARS)
  76.  
  77. ##  Scripts from above, plus site-specific config files.
  78. REST        = \
  79.     newsfeeds \
  80.     hosts.nntp nnrp.access passwd.nntp \
  81.     inn.conf moderators \
  82.     control.ctl expire.ctl nntpsend.ctl \
  83.     innwatch.ctl distrib.pats
  84. ALL        = $(MOST) $(REST)
  85.  
  86. REST_INSTALLED    = \
  87.     $(PATH_NEWSFEEDS) \
  88.     $(PATH_INNDHOSTS) $(PATH_NNRPACCESS) $(PATH_NNTPPASS) \
  89.     $(PATH_CONFIG) $(PATH_MODERATORS) \
  90.     $(PATH_CONTROLCTL) $(PATH_EXPIRECTL) $(NEWSLIB)/nntpsend.ctl \
  91.     $(PATH_CTLWATCH) $(PATH_DISTPATS)
  92. ALL_INSTALLED    = $(MOST_INSTALLED) $(REST_INSTALLED)
  93.  
  94. ##  Get new versions of everything from samples directory.
  95. all:        $(P) $(ALL) config
  96.  
  97. ##  Get only scripts, not per-host config files.
  98. most:        $(MOST)
  99.  
  100. ##  Show changes between files here and ones in samples.
  101. diff:
  102.     @$(MAKE) COPY=-diff all
  103.  
  104. ##  Show changes between files here and installed versions.
  105. diff-installed:
  106.     @$(MAKE) COPY_RPRI=-diff COPY_RPUB=-diff COPY_XPRI=-diff COPY_XPUB=-diff $(ALL_INSTALLED)
  107.  
  108. ##  Show what would be copied from samples directory.
  109. what:
  110.     @$(MAKE) -s 'COPY=@echo' $(ALL) | awk 'NF==2 { print $$2; }'
  111.  
  112. config:        $(ALL)
  113.     $(SHELL) ./do-subst.sh $?
  114.     date >config
  115.  
  116. ##  Don't use parallel rules -- we want this to be viewed carefully.
  117. install:    all $(PAUSE) install-config $(RELOAD_AND_GO)
  118. reload-install:    all pause    install-config reload go
  119. install-config:        update $(REST_INSTALLED)
  120.  
  121. ##  Install scripts, not per-host config files.
  122. update:        $(MOST_INSTALLED)
  123.     date >update
  124.  
  125. ##  Remove files that are unchanged from the release version.
  126. clean:
  127.     rm -f all install lint
  128.     @-for I in $(ALL) ; do \
  129.         cmp -s $$I ../samples/$$I && echo rm -f $$I && rm -f $$I ; \
  130.     done
  131.  
  132. clobber:    clean
  133.     rm -f $(ALL) tags lint profiled
  134.  
  135. tags ctags:
  136.     cp /dev/null tags
  137.  
  138. lint:
  139.     cp /dev/null lint
  140.  
  141. profiled:
  142.     cp /dev/null profiled
  143.  
  144. ##  Commands to make private or public, read or executable files.
  145. COPY_RPRI    = $(SHELL) ../installit.sh $(OWNER) -m 0440 -b .OLD
  146. COPY_RPUB    = $(SHELL) ../installit.sh $(OWNER) -m 0444 -b .OLD
  147. COPY_XPRI    = $(SHELL) ../installit.sh $(OWNER) -m 0550 -b .OLD
  148. COPY_XPUB    = $(SHELL) ../installit.sh $(OWNER) -m 0555 -b .OLD
  149.  
  150. ##  Order:  innd, control, expire, inews, sending, misc
  151. $(PATH_INNDHOSTS):    hosts.nntp    ; $(COPY_RPRI) $? $@
  152. $(NEWSBIN)/makegroup:    makegroup    ; $(COPY_XPRI) $? $@
  153. $(PATH_NEWSFEEDS):    newsfeeds    ; $(COPY_RPUB) $? $@
  154. $(PATH_NNRPACCESS):    nnrp.access    ; $(COPY_RPRI) $? $@
  155. $(PATH_NEWSBOOT):    rc.news        ; $(COPY_XPRI) $? $@
  156. $(PATH_SCHEMA):        overview.fmt    ; $(COPY_RPUB) $? $@
  157. $(CTLBIN)/checkgroups:    checkgroups    ; $(COPY_XPRI) $? $@
  158. $(CTLBIN)/default:    default        ; $(COPY_XPRI) $? $@
  159. $(CTLBIN)/ihave:    ihave        ; $(COPY_XPRI) $? $@
  160. $(CTLBIN)/newgroup:    newgroup    ; $(COPY_XPRI) $? $@
  161. $(CTLBIN)/rmgroup:    rmgroup        ; $(COPY_XPRI) $? $@
  162. $(CTLBIN)/sendme:    sendme        ; $(COPY_XPRI) $? $@
  163. $(CTLBIN)/sendsys:    sendsys        ; $(COPY_XPRI) $? $@
  164. $(CTLBIN)/senduuname:    senduuname    ; $(COPY_XPRI) $? $@
  165. $(CTLBIN)/version:    version        ; $(COPY_XPRI) $? $@
  166. $(PATH_CONTROLCTL):    control.ctl    ; $(COPY_RPRI) $? $@
  167. $(PATH_CTLWATCH):    innwatch.ctl    ; $(COPY_RPRI) $? $@
  168. $(PATH_PARSECTL):    parsecontrol    ; $(COPY_XPRI) $? $@
  169. $(NEWSBIN)/writelog:    writelog    ; $(COPY_XPRI) $? $@
  170. $(CTLBIN)/docheckgroups: docheckgroups    ; $(COPY_XPRI) $? $@
  171. $(NEWSBIN)/news.daily:    news.daily    ; $(COPY_XPRI) $? $@
  172. $(NEWSBIN)/scanlogs:    scanlogs    ; $(COPY_XPRI) $? $@
  173. $(NEWSBIN)/expirerm:    expirerm    ; $(COPY_XPRI) $? $@
  174. $(NEWSBIN)/tally.control: tally.control    ; $(COPY_XPRI) $? $@
  175. $(NEWSBIN)/tally.unwanted: tally.unwanted ; $(COPY_XPRI) $? $@
  176. $(PATH_EXPIRECTL):    expire.ctl    ; $(COPY_RPRI) $? $@
  177. $(PATH_CONFIG):        inn.conf    ; $(COPY_RPUB) $? $@
  178. $(PATH_MODERATORS):    moderators    ; $(COPY_RPUB) $? $@
  179. $(PATH_DISTPATS):    distrib.pats    ; $(COPY_RPUB) $? $@
  180. $(PATH_NNTPPASS):    passwd.nntp    ; $(COPY_RPRI) $? $@
  181. $(NEWSBIN)/nntpsend:    nntpsend    ; $(COPY_XPRI) $? $@
  182. $(NEWSBIN)/sendbatch:    sendbatch    ; $(COPY_XPRI) $? $@
  183. $(NEWSLIB)/nntpsend.ctl: nntpsend.ctl    ; $(COPY_RPRI) $? $@
  184. $(NEWSLIB)/send-ihave:    send-ihave    ; $(COPY_XPRI) $? $@
  185. $(NEWSLIB)/send-nntp:    send-nntp    ; $(COPY_XPRI) $? $@
  186. $(NEWSLIB)/send-uucp:    send-uucp    ; $(COPY_XPRI) $? $@
  187. $(NEWSBIN)/ctlrun:    ctlrun        ; $(COPY_XPRI) $? $@
  188. $(NEWSBIN)/inncheck:    inncheck    ; $(COPY_XPRI) $? $@
  189. $(NEWSBIN)/innstat:    innstat        ; $(COPY_XPRI) $? $@
  190. $(NEWSBIN)/innwatch:    innwatch    ; $(COPY_XPRI) $? $@
  191. $(PATH_SHELLVARS):    innshellvars    ; $(COPY_RPRI) $? $@
  192. $(NEWSLIB)/innlog.awk:    innlog.awk    ; $(COPY_RPRI) $? $@
  193.  
  194. REASON    = 'Installing site config files from site/Makefile'
  195. go pause:
  196.     -${CTLINND} $@ $(REASON)
  197. reload:
  198.     -${CTLINND} reload all $(REASON)
  199.  
  200. ##  Use this to just replace any changed files you might have made.  Only
  201. ##  do this after you've examined the output of "make -n"!
  202. replace:
  203.     $(MAKE) COPY=cp all
  204.  
  205. ##  Get files from the samples directory.
  206. COPY    = @$(SHELL) ./getsafe.sh
  207. checkgroups:    ../samples/checkgroups        ; $(COPY) $? $@
  208. control.ctl:    ../samples/control.ctl        ; $(COPY) $? $@
  209. ctlrun:        ../samples/ctlrun        ; $(COPY) $? $@
  210. default:    ../samples/default        ; $(COPY) $? $@
  211. docheckgroups:    ../samples/docheckgroups    ; $(COPY) $? $@
  212. expire.ctl:    ../samples/expire.ctl        ; $(COPY) $? $@
  213. expirerm:    ../samples/expirerm        ; $(COPY) $? $@
  214. hosts.nntp:    ../samples/hosts.nntp        ; $(COPY) $? $@
  215. ihave:        ../samples/ihave        ; $(COPY) $? $@
  216. inn.conf:    ../samples/inn.conf        ; $(COPY) $? $@
  217. inncheck:    ../samples/inncheck        ; $(COPY) $? $@
  218. innlog.awk:    ../samples/innlog.awk        ; $(COPY) $? $@
  219. innstat:    ../samples/innstat        ; $(COPY) $? $@
  220. innwatch:    ../samples/innwatch        ; $(COPY) $? $@
  221. innwatch.ctl:    ../samples/innwatch.ctl        ; $(COPY) $? $@
  222. innshellvars:    ../samples/innshellvars        ; $(COPY) $? $@
  223. makegroup:    ../samples/makegroup        ; $(COPY) $? $@
  224. moderators:    ../samples/moderators        ; $(COPY) $? $@
  225. distrib.pats:    ../samples/distrib.pats        ; $(COPY) $? $@
  226. newgroup:    ../samples/newgroup        ; $(COPY) $? $@
  227. news.daily:    ../samples/news.daily        ; $(COPY) $? $@
  228. newsfeeds:    ../samples/newsfeeds        ; $(COPY) $? $@
  229. nnrp.access:    ../samples/nnrp.access        ; $(COPY) $? $@
  230. nntpsend.ctl:    ../samples/nntpsend.ctl        ; $(COPY) $? $@
  231. nntpsend:    ../samples/nntpsend        ; $(COPY) $? $@
  232. overview.fmt:    ../samples/overview.fmt        ; $(COPY) $? $@
  233. parsecontrol:    ../samples/parsecontrol        ; $(COPY) $? $@
  234. writelog:    ../samples/writelog        ; $(COPY) $? $@
  235. passwd.nntp:    ../samples/passwd.nntp        ; $(COPY) $? $@
  236. rc.news:    ../samples/rc.news        ; $(COPY) $? $@
  237. rmgroup:    ../samples/rmgroup        ; $(COPY) $? $@
  238. scanlogs:    ../samples/scanlogs        ; $(COPY) $? $@
  239. send-ihave:    ../samples/send-ihave        ; $(COPY) $? $@
  240. send-nntp:    ../samples/send-nntp        ; $(COPY) $? $@
  241. send-uucp:    ../samples/send-uucp        ; $(COPY) $? $@
  242. sendbatch:    ../samples/sendbatch        ; $(COPY) $? $@
  243. sendme:        ../samples/sendme        ; $(COPY) $? $@
  244. sendsys:    ../samples/sendsys        ; $(COPY) $? $@
  245. senduuname:    ../samples/senduuname        ; $(COPY) $? $@
  246. tally.control:    ../samples/tally.control    ; $(COPY) $? $@
  247. tally.unwanted:    ../samples/tally.unwanted    ; $(COPY) $? $@
  248. version:    ../samples/version        ; $(COPY) $? $@
  249.  
  250. ##  Dependencies.  Default list, below, is probably good enough.
  251. depend:        Makefile $(SOURCES)
  252.     makedepend $(DEFS) $(SOURCES)
  253.  
  254. # DO NOT DELETE THIS LINE -- make depend depends on it.
  255.